﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="Guide._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Welcome to ASP.NET!
    </h2>
    <p>
        To learn more about ASP.NET visit <a href="http://www.asp.net" title="ASP.NET Website">
            www.asp.net</a>.<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Print" />
        <asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="Button" />
        <asp:Button ID="Button3" runat="server" onclick="Button3_Click" 
            Text="Print PreView" />
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ProvinceID"
            AllowPaging="True" AllowSorting="True" OnPageIndexChanged="GridView1_PageIndexChanged"
            OnPageIndexChanging="GridView1_PageIndexChanging">
            <Columns>
                <asp:TemplateField HeaderText="ProvinceCName">
                    <ItemTemplate>
                        <asp:Label ID="ProvinceCName" runat="server" Text='<%# Eval("ProvinceCName") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="ProvinceCName">
                    <ItemTemplate>
                        <asp:Label ID="ClusterID" runat="server" Text='<%#  Eval("ClusterID") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="是否打印">
                    <ItemTemplate>
                        <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%#Convert.ToBoolean(1)%>'>
                        </asp:CheckBox>
                    </ItemTemplate>
                </asp:TemplateField>
                <%--<asp:BoundField DataField="ProvinceCName" HeaderText="ProvinceCName" SortExpression="ProvinceCName" />
                <asp:BoundField DataField="ClusterID" HeaderText="ClusterID" SortExpression="ClusterID" />--%>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:PreContract_9_19_IConnectionString %>"
            SelectCommand="SELECT * FROM [Province]"></asp:SqlDataSource>
    </p>
    <p>
        You can also find <a href="http://go.microsoft.com/fwlink/?LinkID=152368&amp;clcid=0x409"
            title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>.
    </p>
    <div id="Hello" runat="server">
    </div>
</asp:Content>
